﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WWLauncher.ViewModel
{
    public class SystemItemViewModel : INotifyPropertyChanged
    {
        private List<IconViewModel> iconInfos;
        private int selectedMenuIndex;

        public SystemItemViewModel()
        {
            this.SelectedMenuIndex = MainViewModel.Instance().SelectedMenuIndex;
        }


        public int SelectedMenuIndex
        {
            get
            {
                return selectedMenuIndex;
            }
            set
            {
                selectedMenuIndex = value;
                OnPropertyChanged("SelectedMenuIndex");
            }
        }

        public List<IconViewModel> IconInfos
        {
            get
            {
                return iconInfos;
            }
            set
            {
                iconInfos = value;
                OnPropertyChanged("IconInfos");
            }
        }


        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
